package com.baor.controller;

import com.baor.dao.EquipmentDao;
import com.baor.service.AddWorkOrderService;
import com.baor.service.ClearTheDoorService;
import com.baor.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping(value="clearthedoor")
public class ClearTheDoorController {

    @Autowired
    private ClearTheDoorService clearTheDoorService;

    @Autowired
    private AddWorkOrderService addWorkOrderService;

    @RequestMapping(value = "opendoor")
    public R clearthedoor(@RequestBody Map<String, Object> params) {
        return clearTheDoorService.ClearTheDoor(params);
    }

    @RequestMapping(value="addWorkOrder")
    public R addWord(Map<String,Object> params){
        return  addWorkOrderService.addWorkOrder(params);
    }

    @RequestMapping(value = "feedback")
    public R feedback(@RequestBody Map<String, Object> params) {
        return clearTheDoorService.Feedback(params);
    }

    @RequestMapping(value = "equipmentDelivery")
    public R equipmentDelivery(@RequestBody Map<String, Object> params){
        return clearTheDoorService.DeliveryReord(params);
    }


}
